package xsxdjc
public class Func{
	public static def fabonici(num)
	{
		if(num<3) return 1;
		return fabonici(num-2) + fabonici(num-1)
	};

	public static def maxOfList(list)
	{
		if(list)
		{
			def max = list[0]
			list.forEach({max = it>max?it:max})
			return max
		}
		else return null;
	};

	public static def dressUpScore(score)
	{
		return score * 1.1;
	};

	public static Closure rule = {_context_ ->
		switch(_func_){
			case 'fabonici':
				 return fabonici(num);
			case 'maxOfList':
				 return maxOfList(list);
			case 'dressUpScore':
				 return dressUpScore(score);
			default :
				_result_.ret='please provide the correct function name with variable [_func_].';
				break;
		};
	};
};